<template>
  <view class="container">
	<view class="bg-white radius margin-top-xl margin-lr flex align-center padding">
		<view class="cu-avatar xl round" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg);"></view>
		<view class="nick-name margin-left flex-sub">
			未登录
			<button class="bottom" type="primary" open-type="getUserInfo" withCredentials="true" lang="zh_CN" @getuserinfo="wxGetUserInfo">授权登录</button>
		</view>
		<view class="setting">设置</view>
	</view>
    <view class="cu-list menu card-menu margin-top">
    	<view class="cu-item arrow">
    		<view class="content">
    			<text class="cuIcon-favor text-gray"></text>
    			<text class="text-gray">我的收藏</text>
    		</view>
    	</view>
    	<view class="cu-item arrow">
    		<view class="content">
    			<text class="cuIcon-footprint text-gray"></text>
    			<!-- <image src="/static/logo.png" class="png" mode="aspectFit"></image> -->
    			<text class="text-gray">浏览足迹</text>
    		</view>
    	</view>
    	<view class="cu-item arrow">
    		<view class="content">
    			<text class="cuIcon-selection text-gray"></text>
    			<!-- <image src="/static/logo.png" class="png" mode="aspectFit"></image> -->
    			<text class="text-gray">平台介绍</text>
    		</view>
    	</view>
    	<view class="cu-item arrow">
    		<view class="content">
    			<text class="cuIcon-circlefill text-gray"></text>
    			<!-- <image src="/static/logo.png" class="png" mode="aspectFit"></image> -->
    			<text class="text-gray">关于南沙</text>
    		</view>
    	</view>
    	<view class="cu-item arrow">
    		<view class="content">
    			<text class="cuIcon-question text-gray"></text>
    			<!-- <image src="/static/logo.png" class="png" mode="aspectFit"></image> -->
    			<text class="text-gray">常见问题</text>
    		</view>
    	</view>
    </view>
	<view class="guide-item bg-white">
		<view>不清楚如何使用此小程序？</view>
		<view class="flex justify-between margin-top">
			<view>视频指南>></view>
			<view>使用指南>></view>
		</view>
	</view>
  </view>
</template>
<script>
import Vue from 'vue'
import { VUE_APP_NGINX_URL } from '@/config'
import { isDefine } from '@/utils/index'
import { login } from "@/api/user"
export default {
  components: {},
  data() {
    return {
		fileUrl: VUE_APP_NGINX_URL,
		windowHeight: this.windowHeight,
		windowWidth: this.windowWidth,
		userInfo: uni.getStorageSync('userInfo'),
		status: 'loading', // loading noMore  more
	}
  },
  onShow() {

  },
  onLoad(e) {
    this.loadData()
  },
  methods: {
    loadData() {},
	// 第一授权获取用户信息 ===》按钮触发
	wxGetUserInfo() {
		let _self = this;
		// 1.获取用户的信息
		uni.login({
		  provider: 'weixin',
		  success: function (loginRes) {
			console.log(loginRes.code);
			// 获取用户信息
			login({
				code: loginRes.code,
			}).then(({ data }) => {
				console.log( data )
			}).catch(err => {});
		  }
		});
		return false
	},
  }

}
</script>
